% The following script was written to look for files
% in the subfolders of an ftp directory.

f = ftp('ftp.denji102.geo.kyushu-u.ac.jp');

S = dir(f);

for i = 5:length(S),
    
    if S(i).isdir == 1,
        
        %cd(S(i).name);
        display(S(i).name);
        K = dir(f,S(i).name);
        
        for j = 1:length(K)
            display(['          ' K(j).name]);
            if any(strfind(lower(K(j).name),'yap'));
                
                
                diaply(K(j).name);
            end;
        end;
        
        
    end;
end;
